module full_adder (
    input  a,
    input  b,
    input  cin,
    output cout,
    output sum
);
  wire cout1, sum1, cout2;
  half_adder hf_1 (
      .a   (a),
      .b   (b),
      .sum (sum1),
      .cout(cout1)
  );
  half_adder hf_2 (
      .a   (sum1),
      .b   (cin),
      .sum (sum),
      .cout(cout2)
  );
  assign cout = cout1 | cout2;
endmodule
